//
//  YCSegueViewController.m
//  DemoTransition
//
//  Created by yunsheng on 15/7/23.
//  Copyright (c) 2015年 yunsheng. All rights reserved.
//

#import "YCSegueViewController.h"

#import "YCVCsWindTransition.h"
#import "YCVCsUnWindTransition.h"

@interface YCSegueViewController ()

@property (nonatomic, strong) UIPercentDrivenInteractiveTransition *percentDrivenTransition;

@end

@implementation YCSegueViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UISwipeGestureRecognizer *swipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(showDetail:)];
    swipe.direction = UISwipeGestureRecognizerDirectionUp;
    [self.view addGestureRecognizer:swipe];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

-(UIStoryboardSegue *)segueForUnwindingToViewController:(UIViewController *)toViewController fromViewController:(UIViewController *)fromViewController identifier:(NSString *)identifier
{
    if ([identifier isEqualToString:@"segueSegue"]) {
        return [[YCVCsWindTransition alloc] initWithIdentifier:identifier source:fromViewController destination:toViewController];
    } else {
        return [super segueForUnwindingToViewController:toViewController fromViewController:fromViewController identifier:identifier];
    }
}

-(void)returnLastVC:(UIStoryboardSegue *)segue
{
    
}

- (void)showDetail:(UISwipeGestureRecognizer *)swipe
{
    [self performSegueWithIdentifier:@"segueSegueDetail" sender:nil];
}

@end
